//
//  Common.swift
//  JJSina
//
//  Created by mac on 2017/12/4.
//  Copyright © 2017年 xinyuan. All rights reserved.
//

import UIKit
// 新浪微博需要的信息
let JJ_APP_KEY = "3233079270"
let JJ_APP_SECRECT = "dfe6d8b8a0a7df0cda1c60decf1efcb3"
let JJ_REDIRECT_URI = "http://www.baidu.com"
let JJ_USER = ""
let JJ_PASSWORD = ""
// 通知信息(更换根控制器)
let JJ_CHANGE_ROOTCONTROLLER_NOTIFICATION = "changeRootControllerNotification"
// 屏幕的宽高
let JJ_SCREEN_W = UIScreen.main.bounds.width
let JJ_SCREEN_H = UIScreen.main.bounds.height
// 常用字体大小
let JJ_SMALL_FONTSIZE: CGFloat = 10
let JJ_MIDDLE_FONTSIZE: CGFloat = 14
let JJ_LARGE_FONTSIZE: CGFloat = 18

// 主体颜色
let JJ_THEMECOLOR = UIColor.orange
// RGB
func RGB(r:CGFloat, g:CGFloat, b:CGFloat, alpha:CGFloat = 1) -> UIColor{
    
    return UIColor(red: r/CGFloat(255), green: g/CGFloat(255), blue: b/CGFloat(255), alpha: alpha)
    
}
// 抽取随机颜色
func JJRandomColor() -> UIColor{
    let r = CGFloat(arc4random()%256)
    let g = CGFloat(arc4random()%256)
    let b = CGFloat(arc4random()%256)
    return RGB(r: r, g: g, b: b)
}
////3.定义调试的宏
//func JJLog<N>(message:N,fileName:String = #file,methodName:String = #function,lineNumber:Int = #line){
//    #if Debug
//        print("\(fileName as NSString)\n方法:\(methodName)\n行号:\(lineNumber)\n打印信息\(message)");
//    #endif
//}


